package com.yuntuzhilian.chapter2;

/**
 * @author MrWang-shuizhishuiheshui
 * @description
 */
public class Demo5 {
    public static void main(String[] args) {
//        String[] names={"qwe","asd","zxc"};
//        System.out.println(names.length);


        String str="我爱我的祖国,我爱我的家乡,我爱这一群小屁孩~~~";
        //字符串.length() : 获取字符串的字符个数(长度)
        System.out.println(str.length());

        String a="aSdF";
        String b="AsDf";
        System.out.println(a==b);
        System.out.println(a.equals(b));
        // 字符串.equalsIgnoreCase(字符串) : 忽略大小写进行字符串内容比较
        System.out.println("忽略大小写:"+(a.equalsIgnoreCase(b)));
        // 字符串.toLowerCase() : 将大写字母转化为小写
        // 字符串.toUpperCase() : 将小写字母转化为大写
        System.out.println("全部转化为大写,进行比较: "+(a.toUpperCase().equals(b.toUpperCase())));
        // 字符串.concat(字符串) : 字符串拼接
        System.out.println(a.concat(b).concat(b));

    }
}
